package com.mew.common.entity.sys;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zebra.common.ByteBufUtils;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

/**
 * <p>
 * 
 * </p>
 *
 * @author ztq
 * @since 2021-06-17
 */

@Data
@ToString
@TableName("s_bulletin")
public class Bulletin {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String head;

    private String body;

    private String foot;

    /**
     * 层级
     */
    private Integer layer;

    @TableField("from_vip")
    private Integer fromVip;

    @TableField("to_vip")
    private Integer toVip;

    private Integer state;

    public void write(ByteBuf b){
        ByteBufUtils.writeString(b,head);
        ByteBufUtils.writeString(b,body);
        ByteBufUtils.writeString(b,foot);

    }

}
